package com.taxshare.seller.constant;

/**
 * @ClassName: PrinterConstant
 * @Description:
 * @author: Hai
 * @date: 2021/6/8 10:23
 */
public class PrinterConstant {

    private PrinterConstant(){}

    public static final String PRINTER0000 = "0000";

    public static final String PRINT_DEFAULT_AFFRESS = "https://taxsapi.holytax.com/v1/api/t";

    public static final String PRINT_VERSION = "http://127.0.0.1:49990/PRINT/VERSION";

    public static final String PRINT_GET_PRINT_LIST = "http://127.0.0.1:49990/PRINT/GetPrintList";

    public static final String PRINT_SETPRINT = "http://127.0.0.1:49990/PRINT/SetPrint";

    public static final String PRINT_INITPRINT = "http://127.0.0.1:49990/PRINT/InitPrint";

    public static final String PRINT_ZDYQDFP = "http://127.0.0.1:49990/PRINT/PrintZdyQdfp";

    public static String coverInvoiceType(String invoiceType){
        if("004".equals(invoiceType)){
            return "0";
        }else if("007".equals(invoiceType)){
            return "2";
        }else if("005".equals(invoiceType)){
            return "12";
        }
        return null;
    }

    public static String coverInvoiceState(String invoiceState){
        if("0".equals(invoiceState)){
            return "0";
        }else if("1".equals(invoiceState)){
            return "3";
        }else if("2".equals(invoiceState)){
            return "1";
        }
        return null;
    }

    public static String transInvoiceType(String fplx) {
        if ("0".equals(fplx)) {
            fplx = "004";
        } else if ("2".equals(fplx)) {
            fplx = "007";
        } else if ("11".equals(fplx)) {
            fplx = "009";
        } else if ("12".equals(fplx)) {
            fplx = "005";
        } else if ("41".equals(fplx)) {
            fplx = "025";
        } else if ("51".equals(fplx)) {
            fplx = "026";
        } else if ("004".equals(fplx)) {
            fplx = "0";
        } else if ("007".equals(fplx)) {
            fplx = "2";
        } else if ("009".equals(fplx)) {
            fplx = "11";
        } else if ("005".equals(fplx)) {
            fplx = "12";
        } else if ("025".equals(fplx)) {
            fplx = "41";
        } else if ("026".equals(fplx)) {
            fplx = "51";
        }
        return fplx;
    }



}
